<!--
  @author wangjie
  @since 2019/07/31
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<!--表格id与lay-filter属性一致，统一定义为zmn-table-->
<table class="layui-hide" id="zmn-table" lay-filter="zmn-table" th:fragment="table">
    <thead>
    <tr>
        <th lay-data="{type:'checkbox', fixed: 'left', width:50 }"></th>
        <th lay-data="{field:'eventId', unresize:true, align:'center'}">事件ID</th>
        <th lay-data="{field:'eventName',  unresize:true, align:'left'}">事件名称</th>
        <th lay-data="{field:'remarks',  unresize:true, align:'left'}">事件备注</th>
        <th lay-data="{field:'status',  unresize:true, align:'left'}">状态</th>
        <th lay-data="{field:'updater',  unresize:true, align:'left'}">最近修改人</th>
        <th lay-data="{field:'updateTime', unresize:true, align:'left'}">最近修改日期</th>
        <!--规定操作列置于最后-->
        <th lay-data="{field:'操作', unresize:true, align:'center', fixed:'right'}">操作</th>
    </tr>
    </thead>
    <tbody>
        <tr th:each="item:${items}">
            <td></td>
            <td th:text="${item.eventId}"></td>
            <td th:text="${item.eventName}"></td>
            <td th:text="${item.remarks}"></td>
            <!--<td th:text="${T(com.zmn.plat.common.dictionary.StatusEnum).getName(item.status)}"></td>-->
            <td>
                <div>
                    <input type="checkbox" name="status" id="status" th:key="${item.eventId}" th:value="${item.status}"
                           lay-text="ON|OFF" lay-skin="switch" lay-filter="chk_one_status"
                           th:checked="${item.status == 2}"/>
                </div>
            </td>
            <td th:text="${item.updater}"></td>
            <td th:text="${T(com.zmn.common.utils.date.DateUtil).toString(item.updateTime)}"></td>
            <td>
                <a class="layui-btn layui-btn-xs layui-btn-primary" th:href="|/brs/event/info.action?eventId=${item.eventId}|">详情</a>
                <a class="layui-btn layui-btn-xs layui-btn-primary" th:href="|/brs/rule/list.action?eventId=${item.eventId}|">规则管理</a>
            </td>
        </tr>
    </tbody>
</table>
